home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / misc-part1 / 2769 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.eunet.fi!fipnet!kone!jsaarinen
  2. Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.games,comp.sys.amiga.hardware,comp.sys.amiga.misc,comp.sys.amiga.graphics
  3. X-NewsReader: IntuiNews 1.2b (31.7.94)
  4. References: <38232041@kone.fipnet.fi> <volker.0ed8@vb.franken.de> <38232075@kone.fipnet.fi> <volker.0ehd@vb.franken.de> <38232112@kone.fipnet.fi> <volker.0en5@vb.franken.de>
  5. From: "Jyrki Saarinen" <jsaarinen@kone.fipnet.fi>
  6. Date: Tue, 23 Jan 96 18:45:21 UT
  7. Comments: Illegal date header - new date added by quicknews
  8. X-Original-Date: Tue, 23 Jan 96 19:08:35 
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset=iso-8859-1
  11. Content-Transfer-Encoding: binary
  12. Subject: Re: FPU and games?
  13. Message-ID: <38232154@kone.fipnet.fi>
  14.  
  15.  
  16. > It is. fmove.l fpx,dy converts an 80bit floating point number to a
  17. > 32bit signed integer.
  18.  
  19. Ok, great. I stupidly thought that fint is needed when it was
  20. not. 
  21.  
  22. Now, I can see how FPU can be used in perspective correct
  23. texture mapping. Everything could be fitted into registers..
  24.  
  25. Hmm. I tested a loop like this:
  26.  
  27.     fmove    fp2,fp6        ;v<<8/z
  28.     fmove    fp0,fp7        ;u/z
  29.     fdiv    fp4,fp6        ;v<<8 = v<<8/z / 1/z
  30.     fdiv    fp4,fp7        ;u = u/z / 1/z
  31.     fmove.l    fp6,d0
  32.     fmove.b    fp7,d0
  33.     move.b    (a0,d0.l),(a1)+
  34.     fadd    fp2,fp3        ;v/z+=v/z step
  35.     fadd    fp0,fp1        ;u/z+=u/z step
  36.     fadd    fp5,fp4        ;1/z+=1/z step
  37.  
  38. Now, with those fmoves to data registers this loop
  39. was very slow. Any reason why? Without those fmoves
  40. this loop was about the clock cycles the 040 manual
  41. tells.
  42.  
  43. --                               _
  44. a Stellar programmer          _ //
  45. "Amiga - back for the future" \X/
  46.